package com.jxb.config;

import com.alibaba.csp.sentinel.adapter.spring.webmvc.callback.RequestOriginParser;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;

@Component
public class RequestOriginParserDefinition implements RequestOriginParser {
    @Override
    public String parseOrigin(HttpServletRequest request) {
//        String serviceName = request.getParameter("serviceName");
        String serviceName = "sentinel-demo";
        StringBuffer requestURL = request.getRequestURL();
        System.out.println("进行名单删选");
        return serviceName;
    }
}
